﻿@{
    ViewBag.Title = "信息模块--添加留言";
    Layout = "~/Views/Shared/_Form.cshtml";
}

<form id="form1" style="padding-right: 15px;padding-top: 15px;">
    <table class="form">
        <tr>
            <th class="formTitle">提交人：</th>
            <td class="formValue">
                <label style="font-weight: bolder;">@ViewData["username"]</label>
                <input type="hidden" id="F_CreatorUserId" name="F_CreatorUserId" value="@ViewData["userid"]"/>
            </td>
        </tr>
        <tr>
            <th class="formTitle">标题：</th>
            <td class="formValue">
                <input id="F_Title" name="F_Title" type="text" class="form-control required" placeholder="请输入标题"/>
            </td>
        </tr>
        <tr>
            <th class="formTitle">联系方式：</th>
            <td class="formValue">
                <input id="F_Contact" name="F_Contact" type="text" class="form-control required" placeholder="请输入联系方式"/>
            </td>
        </tr>
        <tr>
            <th class="formTitle" valign="top" style="padding-top: 5px;">
                内容：
            </th>
            <td class="formValue">
                <textarea id="F_Content" name="F_Content" class="form-control required" placeholder="请输入留言内容" rows="10"></textarea>
            </td>
        </tr>
    </table>
</form>
<script type="text/javascript">

    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/InformationCenter/Messages/SubmitForm",
            param: $("#form1").formSerialize(),
            success: function() {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
                $.currentWindow().$(".toolbar .operate").find('.close').click();
            }
        });
    }

</script>